<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        [v-cloak]{
            display: none;
        }
    </style>
</head>
<body>
<div id="example">
    <p ref="content">hello!</p>
    <button @click="hint">提示</button>
<!--    <p v-text="msg"></p>-->
    <p v-cloak>{{msg}}</p>
</div>
<script type="text/javascript" src="../js/vue.js"></script>
<script type="text/javascript">
   alert('---')
    new Vue({
        el:'#example',
        data:{
            msg:'hello World'
        },
        methods:{
            hint(){
                alert(this.$refs.content.textContent)
            }
        }
    })
</script>
</body>
</html>